import sun.util.resources.cldr.ar.CalendarData_ar_QA;

import java.util.ArrayList;

public class FanxingMethod {
    public static void main(String[] args) {
        System.out.println(test("java"));
        //_____________________________________
        ArrayList<Car> Cars=new ArrayList();
        Cars.add(new BMW());
        Cars.add(new Benz());
        go(Cars);

        //___________________________________________
       ArrayList<Dog> dog=new ArrayList();
        dog.add(new Dog());
        dog.add(new Dog());
        //____________________________________________--
        //？通配符用法，在使用泛型时可以代表一切类型。可通过extends指定类型范围,叫上限继承
        //？ super Car下限继承

        public static void go1(ArrayList<? extends Car> Cars){

        }


    }
    public static <T extends Car>void go(ArrayList<T> cars){

    }
    public static<T> T test(T t){
        return t;
    }

}
